C# api get value from header

55

C# api get value from header -

string Token = Request.Headers["Custom"];

C# api get value from header -

var re = Request;
    var headers = re.Headers;

    if (headers.Contains("Custom"))
    {
        string token = headers.GetValues("Custom").First();
    }

    return null;

Comments

Submit
0 Comments